package com.qf.demo;

import com.qf.dao.AccountDao;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;


public class Demo {
    public static void main(String[] args) {

        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("bean.xml");
        AccountDao accountDao = (AccountDao) applicationContext.getBean("accountDaoImpl1");
        System.out.println(accountDao);
        ((ClassPathXmlApplicationContext) applicationContext).close();
    }
}
